﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DevPhone.Controls;
using Microsoft.Phone.Controls;
using GestureEventArgs = System.Windows.Input.GestureEventArgs;

namespace DevPhoneToolkitSample.Samples
{
    public partial class WindowsBoxButtonsSample : PhoneApplicationPage
    {
        public WindowsBoxButtonsSample()
        {
            InitializeComponent();
        }

        private static void MsgResult(WindowsBoxResultEventArgs e)
        {
            MessageBox.Show(e.ButtonResult + " value = " + e.ResultValue);
        }

        private void MsgBntTap(object sender, GestureEventArgs e)
        {
            WindowsBoxService.Set()
                .Title("Title")
                .AfterClosed(MsgResult)
                .ButtonType(WindowsBoxButtonType.Custom)
                .AddButton("B1",10)
                .AddButton("B2", 20)
                .AddButton("B3", 33)
                .AddButton("B4", 44)
                .Show("Sample message.");
        }

        private void MsgIcoTap(object sender, GestureEventArgs e)
        {
            var externalicon = new BitmapImage(new Uri("/Images/star.png", UriKind.Relative));
            WindowsBoxService.Set()
                .Title("Title")
                .Icon(externalicon)
                .Show("Sample message.");
        }

    }
}